package java67_adv5;

import java.util.Scanner;

public class SexTest {

	public static void main(String[] args) {
		Sex male = Sex.妖;
		System.out.println(male);
		System.out.println(male.toString());
		System.out.println(male.name());
		Person p = new Person();
		p.setName("张龙");
		p.setAge(21);
		System.out.println("请输入性别:");
		Scanner in = new Scanner(System.in);
		p.setSex(Sex.valueOf(in.next()));
		System.out.println(p);
	}

}
